package com.ruoyi.core.service.impl;

import java.util.List;

import com.ruoyi.common.entity.CoreEntity.ExchangeRecords;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.core.mapper.ExchangeRecordsMapper;

import com.ruoyi.core.service.IExchangeRecordsService;

/**
 * 用户积分兑换记录Service业务层处理
 * 
 * @author 亢哲
 * @date 2025-08-07
 */
@Service
public class ExchangeRecordsServiceImpl implements IExchangeRecordsService 
{
    @Autowired
    private ExchangeRecordsMapper exchangeRecordsMapper;

    /**
     * 查询用户积分兑换记录
     * 
     * @param id 用户积分兑换记录主键
     * @return 用户积分兑换记录
     */
    @Override
    public ExchangeRecords selectExchangeRecordsById(Long id)
    {
        return exchangeRecordsMapper.selectExchangeRecordsById(id);
    }

    /**
     * 查询用户积分兑换记录列表
     * 
     * @param exchangeRecords 用户积分兑换记录
     * @return 用户积分兑换记录
     */
    @Override
    public List<ExchangeRecords> selectExchangeRecordsList(ExchangeRecords exchangeRecords)
    {
        return exchangeRecordsMapper.selectExchangeRecordsList(exchangeRecords);
    }

    /**
     * 新增用户积分兑换记录
     * 
     * @param exchangeRecords 用户积分兑换记录
     * @return 结果
     */
    @Override
    public int insertExchangeRecords(ExchangeRecords exchangeRecords)
    {
        return exchangeRecordsMapper.insertExchangeRecords(exchangeRecords);
    }

    /**
     * 修改用户积分兑换记录
     * 
     * @param exchangeRecords 用户积分兑换记录
     * @return 结果
     */
    @Override
    public int updateExchangeRecords(ExchangeRecords exchangeRecords)
    {
        return exchangeRecordsMapper.updateExchangeRecords(exchangeRecords);
    }

    /**
     * 批量删除用户积分兑换记录
     * 
     * @param ids 需要删除的用户积分兑换记录主键
     * @return 结果
     */
    @Override
    public int deleteExchangeRecordsByIds(Long[] ids)
    {
        return exchangeRecordsMapper.deleteExchangeRecordsByIds(ids);
    }

    /**
     * 删除用户积分兑换记录信息
     * 
     * @param id 用户积分兑换记录主键
     * @return 结果
     */
    @Override
    public int deleteExchangeRecordsById(Long id)
    {
        return exchangeRecordsMapper.deleteExchangeRecordsById(id);
    }
}
